// 取出来调用后端接口的地址
import { API_CONFIG } from "../config/index.js";
import request from "../api/index.js";
// 在很多位置，都可能用到同一个接口
export const getDeploymentListHandler = (clusterId, namespace) => {
    return request(API_CONFIG.getDeploymentListApi, {clusterId, namespace}, "get", "2000")
}

export const deleteDeploymentHandler = (clusterId, namespace, name) => {
    return request(API_CONFIG.deleteDeploymentApi, {clusterId, namespace, name}, "post", "2000")
}
// 
export const createDeploymentHandler = (data) => {
    return request(API_CONFIG.createDeploymentApi, data, "post", "2000")
}

export const updateDeploymentHandler = (data) => {
    return request(API_CONFIG.updateDeploymentApi, data, "post", "2000")
}

export const getDeploymentDetailHandler = (data) => {
    return request(API_CONFIG.getDeploymentApi, data, "get", "2000")
}


export const getReplicaSetListHandler = (data) => {
    return request(API_CONFIG.getReplicaSetListApi, data, "get", "2000")
}